package createpattern.abstractfactory;

/**
 * @author seer
 * @date 2018/2/5 14:09
 */
public class AbstractFactoryPatternDemo {
    public static void main(String[] args) {
        ShapeFactory shapeFactory = FactoryProducer.getFactory(ShapeFactory.class);
        Circle circle = shapeFactory.getShape(Circle.class);
        circle.draw();

        ColorFactory colorFactory = FactoryProducer.getFactory(ColorFactory.class);
        Blue blue = colorFactory.getColor(Blue.class);
        blue.fill();
    }
}
